﻿<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js"> <!--<![endif]-->
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <!-- Set the viewport width to device width for mobile -->
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>{% block site_title %}{{ settings.SITE_TITLE }}{% endblock %}</title>

    {#    {% if meta_description %}#}
    {#        <meta name="description" content="{{ engineer.meta_description }}">#}
    {#    {% endif %}#}
    {##}
    {% if meta_author %}
        <meta name="author"
              content="{% block meta_author %}{{ settings.SITE_AUTHOR }}{% endblock %}">
    {% endif %}

    <link rel="alternate" type="application/atom+xml"
          title="{{ settings.SITE_TITLE }} Atom Feed"
          href="{{ urlname('feed') }}"/>

    {% block normalizecss %}
        {% if theme.use_normalize_css %}
            {% filter compress %}
                <link rel="stylesheet" href="{{ settings.ENGINEER.NORMALIZE_CSS_URL }}">
            {% endfilter %}
        {% endif %}
    {% endblock %}

    {% block foundationcss %}
        {% if theme.use_foundation %}
            {% filter compress %}
                {# FOUNDATION CSS #}
                <link rel="stylesheet"
                      href="{{ settings.ENGINEER.FOUNDATION_CSS_URL }}stylesheets/grid.css">
                <link rel="stylesheet"
                      href="{{ settings.ENGINEER.FOUNDATION_CSS_URL }}stylesheets/mobile.css">

                <!--[if lt IE 9]>
                    <link rel="stylesheet" href="{{ settings.ENGINEER.FOUNDATION_CSS_URL }}stylesheets/ie.css">
                <![endif]-->
            {% endfilter %}
        {% endif %}
    {% endblock %}

    {% block stylesheets %}{% endblock %}
    {% block stylesheets_include %}
        {% include ['_stylesheets.html', 'theme/_stylesheets.html'] ignore missing %}
    {% endblock %}

    {% block lesscss %}
        {% if theme.use_lesscss %}
            {% if not settings.PREPROCESS_LESS %}
                <script src="{{ settings.ENGINEER.LESS_JS_URL }}"
                        type="text/javascript">
                </script>
                {% if DEBUG %}
                    <script type="text/javascript">
                        //less = { env:'development' };
                        less.watch();
                    </script>
                {% endif %}
            {% endif %}
        {% endif %}
    {% endblock %}

    {% block scripts_top %}{% endblock %}
    {% block scripts_top_include %}
        {% include ['_scripts_top.html', 'theme/_scripts_top.html'] ignore missing %}
    {% endblock %}

    {% block modernizr %}
        {% if theme.use_modernizr %}
            <script src="{{ settings.ENGINEER.MODERNIZR_URL }}"
                    type="text/javascript"></script>
        {% endif %}
    {% endblock %}

    {% block jquery %}
        {% if theme.use_jquery -%}
            <!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if offline -->
            <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
            <script>
                window.jQuery || document.write('<script src="{{ settings.ENGINEER.JQUERY_URL }}"><\/script>')
            </script>
        {%- endif %}
    {% endblock %}

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
</head>
<body class="{%- block body_class %}{% endblock -%}">
{%- block browsehappy -%}
    <!--[if lt IE 7]>
    <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
{%- endblock -%}
{%- block body %}{% endblock -%}

{% block foundation_js %}
    {% if theme.use_foundation -%}
        {% filter compress %}
            <script src="{{ settings.ENGINEER.FOUNDATION_CSS_URL }}javascripts/foundation.js"></script>
        {% endfilter %}
    {%- endif %}
{% endblock %}

{% block scripts_bottom %}{% endblock %}
{% block scripts_bottom_include %}
    {% include ['_scripts_bottom.html', 'theme/_scripts_bottom.html'] ignore missing %}
{% endblock %}

</body>
</html>
